package com.studychen.appfxcp.commom.Service;

import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.studychen.appfxcp.commom.mapper.DownLogMapping;
import com.studychen.appfxcp.commom.pojo.DownLog;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

/**
 * @author :chenping
 * @date :Created in 2023/6/28 10:29
 */
@Service
public class DownlogService {
    @Resource
    private DownLogMapping downLogMapping;

    public void insertLog(){
        String code = IdWorker.getIdStr();
        Date now = new Date();
        DownLog d = new DownLog();
        d.setCode(code);
        d.setCreateTime(now);
        downLogMapping.insert(d);
    }
}
